home *** CD-ROM | disk | FTP | other *** search
- @(#) Implement 2.1 90/01/22 13:01:08
-
-
-
- This document describes some implementation aspects of the pc-mail
-
- software.
-
-
-
- MESSAGE DATA BASE
-
-
-
- The message data base resides in the mail spool directory (de-
-
- fined with the MAILDIR environment variable). There are various
-
- classes of message files:
-
-
-
- - mail received from the network
-
-
-
- - mail ready to send over the network
-
-
-
- - messages in preparation
-
-
-
- - mail that has been sent
-
-
-
- In addition there are administrative files (LOGFILE, alias data
-
- base and communications parameters). Optional files are: header
-
- (with template message header) and trailer (with the user's
-
- signature).
-
-
-
- Each message takes two files: a data file (with the actual mes-
-
- sage) and a meta file (with on the first line: originator or
-
- destination addresses, or a one-line summary in case of a message
-
- in preparation; and on the second line: a subject).
-
-
-
- Data/meta file names are constructed by concatenating a single-
-
- character prefix with a five-digit sequence number. Corresponding
-
- data and meta files have the same sequence number. The prefix
-
- characters are:
-
-
-
- E message in preparation
-
- C description of message
-
-
-
- N message received from the net
-
- H originator address and subject in case of an unread message
-
- O originator address and subject in case of already read message
-
-
-
- D message ready to be sent over the net
-
- X destination of that message and subject
-
-
-
- Q message already sent over the net
-
- R destination of that message and subject
-
-
-
- Administrative files are
-
-
-
- LOGFILE transaction log
-
- s00000 communications parameters
-
- a00000 alias data base
-
-
-
- All files in the mail directory are ordinary text files, with a
-
- possible exception for the message in preparation (this depends
-
- on the editor being used).
-
-
-
- Files in the mail directory are normally write-protected to
-
- prevent accidents.
-
-
-
- The length of lines in the "meta" files is at most 1024 bytes
-
- (see the MAXLINE macro in the file defs.h).
-
-
-
- Most mailers will object to messages with lines longer than about
-
- 132 characters.
-
-
-
- HOW THE PROGRAMS OPERATE
-
-
-
- The message data base is shared by several programs. First of
-
- all, there is the mail program itself that provides the main user
-
- interface. Other programs are: cico (takes unsent messages from
-
- the mail data base, and changes their status to "sent" after they
-
- have been sent over the network), smail (queues a message for
-
- transmission by the cico program), rmail (extracts originator
-
- names and subject information from messages received by the cico
-
- program) and cmail (scans the mail data base for unread
-
- messages). If the mail directory is mounted from a file server,
-
- the cico program is not used; instead, its task is performed by
-
- the pc-mail and pc-maild daemon programs that run on the file
-
- server.
-
-
-
- The following picture shows how the programs interact with each
-
- other, and with the mail data base.
-
-
-
- -----------------------------------------------------------------
-
- program |purpose |invokes
-
- --------+-------------------------------+--------------------------
-
- mail |main user interface |cico, smail, rmail, editor
-
- | |
-
- cico |file transfer program |none; invoked by mail, cmail
-
- | |
-
- smail |queue file for transmission |none; invoked by mail
-
- | |
-
- rmail |extract sender and subject |none; invoked by mail, cmail
-
- | |
-
- cmail |search for unread mail |none
-
- --------+-------------------------------+--------------------------
-
- pc-mail |deliver mail (on file server) |none; invoked by sendmail
-
- | |
-
- pc-maild|send mail (on file server) |/usr/bin/rmail
-
- -------------------------------------------------------------------
-
-
-
- UUCP FUNCTIONALITY
-
-
-
- The cico program provided here supports a subset of the uucp file
-
- exchange facilities, just enough to interface to the message
-
- database structure (spool directory) described in the previous
-
- section.
-
-
-
- The main differences with the unix uucico program are:
-
-
-
- - No support for C (command) files. cico scans the spool
-
- directory for message and destination files instead.
-
-
-
- - Only the H (hangup), S (send) and C (copy) requests are
-
- supported. R (receive) requests are not allowed. Sending or
-
- receiving files by path name is rarely allowed anyway, and works
-
- only between adjacent uucp nodes. This is only a minor
-
- limitation; files can still be sent as mail messages.
-
-
-
- - The cico program assumes that all incoming D (data) files are
-
- mail messages.
-
-
-
- - The cico program ignores incoming X (execute) files. X files
-
- normally contain the commands to dispose of D (data) files.
-
-
-
-